///\todo upgrade

//////////////////////////////////////////////////////////////////////////////////
//                                                                              //
//  This file is part of the buola project (https://code.google.com/p/buola/).  //
//                                                                              //
//  Copyright(c) 2007-2012 Xavi Gratal                                          //
//  gratal AT gmail DOT com                                                     //
//                                                                              //
//  Buola is free software: you can redistribute it and/or modify               //
//  it under the terms of the GNU General Public License as published by        //
//  the Free Software Foundation, either version 3 of the License, or           //
//  (at your option) any later version.                                         //
//                                                                              //
//  Buola is distributed in the hope that it will be useful,                    //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of              //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               //
//  GNU General Public License for more details.                                //
//                                                                              //
//  You should have received a copy of the GNU General Public License           //
//  along with buola.  If not, see <http://www.gnu.org/licenses/>.              //
//                                                                              //
//////////////////////////////////////////////////////////////////////////////////

#ifndef _BUOLA_UTILITY_KEYS_H_
#define _BUOLA_UTILITY_KEYS_H_

#include <buola/buola.h>

namespace buola {

///key codes
enum EKeyCode
{
    KEY_NONE,
    KEY_ESC,
    KEY_0,
    KEY_1,
    KEY_2,
    KEY_3,
    KEY_4,
    KEY_5,
    KEY_6,
    KEY_7,
    KEY_8,
    KEY_9,
    
    KEY_A,
    KEY_B,
    KEY_C,
    KEY_D,
    KEY_E,
    KEY_F,
    KEY_G,
    KEY_H,
    KEY_I,
    KEY_J,
    KEY_K,
    KEY_L,
    KEY_M,
    KEY_N,
    KEY_O,
    KEY_P,
    KEY_Q,
    KEY_R,
    KEY_S,
    KEY_T,
    KEY_U,
    KEY_V,
    KEY_W,
    KEY_X,
    KEY_Y,
    KEY_Z,

    KEY_MINUS,
    KEY_EQUAL,
    
    KEY_BACKSPACE,
    KEY_TAB,
    
    KEY_LBRACKET,
    KEY_RBRACKET,
    
    KEY_ENTER,
    
    KEY_LCONTROL,
    
    KEY_SEMICOLON,
    KEY_APOSTROPHE,
    KEY_GRAVE,
    
    KEY_LSHIFT,
    KEY_BACKSLASH,
    
    KEY_COMMA,
    KEY_PERIOD,
    KEY_SLASH,
    
    KEY_RSHIFT,
    KEY_KPMULTIPLY,
    
    KEY_LALT,
    KEY_SPACE,
    KEY_CAPSLOCK,
    
    KEY_F1,
    KEY_F2,
    KEY_F3,
    KEY_F4,
    KEY_F5,
    KEY_F6,
    KEY_F7,
    KEY_F8,
    KEY_F9,
    KEY_F10,
    KEY_F11,
    KEY_F12,
    KEY_F13,
    KEY_F14,
    KEY_F15,
    KEY_F16,
    KEY_F17,
    KEY_F18,
    KEY_F19,
    KEY_F20,
    
    KEY_NUMLOCK,
    KEY_SCROLLLOCK,
    
    KEY_KP7,
    KEY_KPHOME,
    KEY_KP8,
    KEY_KPUP,
    KEY_KP9,
    KEY_KPPGUP,
    KEY_KPMINUS,
    KEY_KP4,
    KEY_KPLEFT,
    KEY_KP5,
    KEY_KP6,
    KEY_KPRIGHT,
    KEY_KPPLUS,
    KEY_KP1,
    KEY_KPEND,
    KEY_KP2,
    KEY_KPDOWN,
    KEY_KP3,
    KEY_KPPGDN,
    KEY_KP0,
    KEY_KPINS,
    KEY_KPPERIOD,
    KEY_KPDEL,
    KEY_KPEQUAL,
    
    KEY_LESS,
    
    KEY_KPENTER,
    KEY_RCONTROL,
    KEY_KPDIVIDE,
    KEY_PRINTSCREEN,
    KEY_ALTGR,
    KEY_PAUSE,
    KEY_BREAK,
    
    KEY_HOME,
    KEY_UP,
    KEY_PGUP,
    KEY_LEFT,
    KEY_RIGHT,
    KEY_END,
    KEY_DOWN,
    KEY_PGDN,
    KEY_INS,
    KEY_DEL,
    KEY_LWIN,
    KEY_RWIN,
    KEY_WINMENU,
    KEY_COMMAND,
    KEY_FUNCTION,
    KEY_HELP,
    
    KEY_VOLUMEUP,
    KEY_VOLUMEDOWN,
    KEY_AUDIOMUTE,
    
    KEY_COUNT
};

enum EKeyMod
{
    KEYMOD_NONE=0,
    KEYMOD_SHIFT=(1<<0),
    KEYMOD_CONTROL=(1<<1),
    KEYMOD_ALT=(1<<2),
    KEYMOD_ALTGR=(1<<3),
    KEYMOD_WIN=(1<<7),
    KEYMOD_COMMAND=(1<<8),
    KEYMOD_ANY=(1<<15),
    KEYMOD_ALL=KEYMOD_SHIFT|KEYMOD_CONTROL|KEYMOD_ALT|KEYMOD_ALTGR|KEYMOD_WIN
};

DECLARE_ENUM_BITOPS(EKeyMod);

enum EKeyLock
{
    KEYLOCK_NONE=0,
    KEYLOCK_NUM=(1<<4),
    KEYLOCK_CAPS=(1<<5),
    KEYLOCK_SCROLL=(1<<6),
    KEYLOCK_ANY=(1<<15),
    KEYLOCK_ALL=KEYLOCK_NUM|KEYLOCK_CAPS|KEYLOCK_SCROLL
};

DECLARE_ENUM_BITOPS(EKeyLock);

/*namespace buola*/ }

#endif
